package com.jcz.interceptor;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class LoginInterceptor extends AbstractInterceptor {

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		Map session=ActionContext.getContext().getSession();
		Object object=session.get("logined");
		if(object==null){
			return "notlogin";
		}else{
			return invocation.invoke();
			
		}
	}

}
